<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/


$router->get('/config', 'Admin\IndexController@config');
$router->get('/captcha', 'Admin\IndexController@captcha');
$router->post('/login', 'Admin\LoginController@login');

$router->group(['middleware' => 'AdminGuard', 'namespace' => 'Admin'], function () use ($router) {
    $router->get('/menu', 'IndexController@menu');
    $router->post('/password', 'IndexController@alterPassword');

    $router->get('/sys/user', 'SysUserController@get');
    $router->get('/sys/user/{id}', 'SysUserController@find');
    $router->post('/sys/user', 'SysUserController@create');
    $router->put('/sys/user/{id}', 'SysUserController@update');
    $router->delete('/sys/user/{ids}', 'SysUserController@delete');

    $router->get('/sys/group', 'SysGroupController@get');
    $router->get('/sys/group/list', 'SysGroupController@list');
    $router->get('/sys/group/{id}', 'SysGroupController@find');
    $router->post('/sys/group', 'SysGroupController@create');
    $router->put('/sys/group/{id}', 'SysGroupController@update');
    $router->delete('/sys/group/{ids}', 'SysGroupController@delete');
    $router->get('sys/operation', 'SysGroupController@getOperation');

    $router->get('/sys/log', 'SysLogController@get');
});

